home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / sched / schedInt.h < prev    next >
C/C++ Source or Header  |  1990-10-05  |  2KB  |  56 lines

  1. /*
  2.  * schedInt.h --
  3.  *
  4.  *    Declarations of constants and variables local to the scheduling 
  5.  *    module.
  6.  *
  7.  * Copyright (C) 1985 Regents of the University of California
  8.  * All rights reserved.
  9.  *
  10.  *
  11.  * $Header: /sprite/src/kernel/sched/RCS/schedInt.h,v 9.2 90/10/05 17:14:20 mendel Exp $ SPRITE (Berkeley)
  12.  */
  13.  
  14. #ifndef _SCHEDINT
  15. #define _SCHEDINT
  16.  
  17. #include <list.h>
  18.  
  19. #define SCHED_MAX_DUMP_SIZE 100
  20.  
  21. extern List_Links *schedReadyQueueHdrPtr;
  22.  
  23. /*
  24.  * To the scheduler module, a processor may be in one of following states:
  25.  *    PROCESSOR_NOT_STARTED - The processor has not be started running
  26.  *                 Sprite.
  27.  *    PROCESSOR_ACTIVE      - The processor is currently running Sprite.
  28.  *    PROCESSOR_IDLE          - The processor is current running Sprite but
  29.  *                should not be given processes to execute.
  30.  *    PROCESSOR_STARTING    - The processor is in the act of starting.
  31.  *    PROCESSOR_COUNTING_TICKS - The processor is idling for 5 seconds
  32.  *                   to count idle ticks per second.  This
  33.  *                    state is different from idling because
  34.  *                   when the process is made ready after 5
  35.  *                   seconds we want this processor to run it.
  36.  */
  37. typedef enum { 
  38.     SCHED_PROCESSOR_NOT_STARTED, 
  39.     SCHED_PROCESSOR_STARTING,
  40.     SCHED_PROCESSOR_ACTIVE, 
  41.     SCHED_PROCESSOR_IDLE,
  42.     SCHED_PROCESSOR_COUNTING_TICKS
  43. } Sched_ProcessorStatus;
  44.  
  45. extern    Sched_ProcessorStatus sched_ProcessorStatus[MACH_MAX_NUM_PROCESSORS];
  46.  
  47. /*
  48.  * The desired quantum length, in microseconds.  The real quantum length
  49.  * might be different since it has to be a multiple of the timer interrupt
  50.  * interval.
  51.  */
  52.  
  53. #define SCHED_DESIRED_QUANTUM 100000
  54.  
  55. #endif /* _SCHEDINT */
  56.